Integrand size = 23, antiderivative size = 81 \[ \int (a+a \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {1}{2} a (2 A+C) x+\frac {a (3 A+C) \sin (c+d x)}{3 d}-\frac {a C \cos (c+d x) \sin (c+d x)}{6 d}+\frac {C (a+a \cos (c+d x))^2 \sin (c+d x)}{3 a d} \]
1/2*a*(2*A+C)*x+1/3*a*(3*A+C)*sin(d*x+c)/d-1/6*a*C*cos(d*x+c)*sin(d*x+c)/d +1/3*C*(a+a*cos(d*x+c))^2*sin(d*x+c)/a/d
Time = 0.12 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.73 \[ \int (a+a \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {a (6 c C+12 A d x+6 C d x+3 (4 A+3 C) \sin (c+d x)+3 C \sin (2 (c+d x))+C \sin (3 (c+d x)))}{12 d} \]
(a*(6*c*C + 12*A*d*x + 6*C*d*x + 3*(4*A + 3*C)*Sin[c + d*x] + 3*C*Sin[2*(c + d*x)] + C*Sin[3*(c + d*x)]))/(12*d)
Time = 0.33 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.14, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 3503, 3042, 3213}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a \cos (c+d x)+a) \left (A+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right ) \left (A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 3503 |
\(\displaystyle \frac {\int (\cos (c+d x) a+a) (a (3 A+2 C)-a C \cos (c+d x))dx}{3 a}+\frac {C \sin (c+d x) (a \cos (c+d x)+a)^2}{3 a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right ) \left (a (3 A+2 C)-a C \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx}{3 a}+\frac {C \sin (c+d x) (a \cos (c+d x)+a)^2}{3 a d}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {\frac {a^2 (3 A+C) \sin (c+d x)}{d}+\frac {3}{2} a^2 x (2 A+C)-\frac {a^2 C \sin (c+d x) \cos (c+d x)}{2 d}}{3 a}+\frac {C \sin (c+d x) (a \cos (c+d x)+a)^2}{3 a d}\) |
(C*(a + a*Cos[c + d*x])^2*Sin[c + d*x])/(3*a*d) + ((3*a^2*(2*A + C)*x)/2 + (a^2*(3*A + C)*Sin[c + d*x])/d - (a^2*C*Cos[c + d*x]*Sin[c + d*x])/(2*d)) /(3*a)
3.1.3.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Cos[e + f*x]*((a + b*Sin[e + f*x])^ (m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^ m*Simp[A*b*(m + 2) + b*C*(m + 1) - a*C*Sin[e + f*x], x], x], x] /; FreeQ[{a , b, e, f, A, C, m}, x] && !LtQ[m, -1]
Time = 3.63 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.63
method | result | size |
parallelrisch | \(\frac {a \left (\frac {\sin \left (2 d x +2 c \right ) C}{4}+\frac {\sin \left (3 d x +3 c \right ) C}{12}+\left (A +\frac {3 C}{4}\right ) \sin \left (d x +c \right )+d x \left (A +\frac {C}{2}\right )\right )}{d}\) | \(51\) |
derivativedivides | \(\frac {\frac {a C \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+a C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a A \sin \left (d x +c \right )+a A \left (d x +c \right )}{d}\) | \(68\) |
default | \(\frac {\frac {a C \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+a C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a A \sin \left (d x +c \right )+a A \left (d x +c \right )}{d}\) | \(68\) |
risch | \(a x A +\frac {a C x}{2}+\frac {\sin \left (d x +c \right ) a A}{d}+\frac {3 a C \sin \left (d x +c \right )}{4 d}+\frac {\sin \left (3 d x +3 c \right ) a C}{12 d}+\frac {\sin \left (2 d x +2 c \right ) a C}{4 d}\) | \(68\) |
parts | \(a x A +\frac {\sin \left (d x +c \right ) a A}{d}+\frac {a C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {a C \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}\) | \(69\) |
norman | \(\frac {\frac {a \left (2 A +C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {a \left (2 A +3 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {a \left (2 A +C \right ) x}{2}+\frac {3 a \left (2 A +C \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {3 a \left (2 A +C \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {a \left (2 A +C \right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {4 a \left (3 A +C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}\) | \(151\) |
Time = 0.26 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.69 \[ \int (a+a \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (2 \, A + C\right )} a d x + {\left (2 \, C a \cos \left (d x + c\right )^{2} + 3 \, C a \cos \left (d x + c\right ) + 2 \, {\left (3 \, A + 2 \, C\right )} a\right )} \sin \left (d x + c\right )}{6 \, d} \]
1/6*(3*(2*A + C)*a*d*x + (2*C*a*cos(d*x + c)^2 + 3*C*a*cos(d*x + c) + 2*(3 *A + 2*C)*a)*sin(d*x + c))/d
Time = 0.12 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.49 \[ \int (a+a \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \, dx=\begin {cases} A a x + \frac {A a \sin {\left (c + d x \right )}}{d} + \frac {C a x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {C a x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {2 C a \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {C a \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {C a \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (A + C \cos ^{2}{\left (c \right )}\right ) \left (a \cos {\left (c \right )} + a\right ) & \text {otherwise} \end {cases} \]
Piecewise((A*a*x + A*a*sin(c + d*x)/d + C*a*x*sin(c + d*x)**2/2 + C*a*x*co s(c + d*x)**2/2 + 2*C*a*sin(c + d*x)**3/(3*d) + C*a*sin(c + d*x)*cos(c + d *x)**2/d + C*a*sin(c + d*x)*cos(c + d*x)/(2*d), Ne(d, 0)), (x*(A + C*cos(c )**2)*(a*cos(c) + a), True))
Time = 0.22 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.83 \[ \int (a+a \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {12 \, {\left (d x + c\right )} A a - 4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a + 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a + 12 \, A a \sin \left (d x + c\right )}{12 \, d} \]
1/12*(12*(d*x + c)*A*a - 4*(sin(d*x + c)^3 - 3*sin(d*x + c))*C*a + 3*(2*d* x + 2*c + sin(2*d*x + 2*c))*C*a + 12*A*a*sin(d*x + c))/d
Time = 0.27 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.79 \[ \int (a+a \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {1}{2} \, {\left (2 \, A a + C a\right )} x + \frac {C a \sin \left (3 \, d x + 3 \, c\right )}{12 \, d} + \frac {C a \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {{\left (4 \, A a + 3 \, C a\right )} \sin \left (d x + c\right )}{4 \, d} \]
1/2*(2*A*a + C*a)*x + 1/12*C*a*sin(3*d*x + 3*c)/d + 1/4*C*a*sin(2*d*x + 2* c)/d + 1/4*(4*A*a + 3*C*a)*sin(d*x + c)/d
Time = 1.02 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.83 \[ \int (a+a \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \, dx=A\,a\,x+\frac {C\,a\,x}{2}+\frac {A\,a\,\sin \left (c+d\,x\right )}{d}+\frac {3\,C\,a\,\sin \left (c+d\,x\right )}{4\,d}+\frac {C\,a\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {C\,a\,\sin \left (3\,c+3\,d\,x\right )}{12\,d} \]